package javaStu.MyCompare;

import lombok.Data;

/**
 * @author: leiwenkang
 * @date: 2020/7/14
 * @time: 19:42
 */
@Data
public class Student implements Comparable<Student> {
    private int id;
    private String name;
    private int age;

    public Student(int id) {
        this.id = id;
    }

    @Override
    public int compareTo(Student student) {
        return this.id - student.id;
    }

}
